import { defineStore } from 'pinia'
import { roleAdd } from '../utils/trueType'
export const useAddRoleStore = defineStore('addRole', {
    state: () => ({
        isOpen: false,
        addRole: {
            id: '',
            roleName: '',
            roleKey: '',
            status: 0,
            time: '',
            description: '',
            permission: []
        } as roleAdd
    }),
    actions: {
        setOpen(val: boolean) {
            this.isOpen = val
        },
        setAddRoleNull(){
            this.addRole = {
                id: '',
                roleName: '',
                roleKey: '',
                status: 0,
                time: '',
                description: '',
                permission: []
            }as roleAdd
        },
    },
    getters: {
        
    },
}
)